Developer --> Technical Publications
PATHHardware Documentation > USB Devices > Mac OS USB DDK API Reference


Device Notification Parameter Block

The parameter block for the device notification callback routine is defined as:

/* Device Notification Parameter Block */
struct USBDeviceNotificationParameterBlock
{
UInt16                                  pbLength;
UInt16                                  pbVersion;
USBNotificationType                     usbDeviceNotification;
UInt8                                   reserved1;
USBDeviceRef                            usbDeviceRef;
UInt16                                  usbClass;
UInt16                                  usbSubClass;
UInt16                                  usbProtocol;
UInt16                                  usbVendor;
UInt16                                  usbProduct;
OSStatus                                result;
UInt32                                  token;
USBDeviceNotificationCallbackProcPtr    callback;
UInt32                                  refcon;
};

Field descriptions

--> pbLength
Length of parameter block
--> pbVersion
Version number of this parameter block
--> pbVersion
--> pbVersion
--> pbVersion
<--> usbDeviceNotification
The type of notification
The following notifications are defined:
kNotifyAnyEvent
kNotifyAddDevice
kNotifyAddInterface
kNotifyRemoveDevice
kNotifyRemoveInterface
--> reserved1[1]
Reserved, needed because of 2-byte 68k alignment
<-- usbDeviceRef
The device reference for the target device
<--> usbClass
The class of the target device, use kUSBAnyClass for any class
<--> usbSubClass
The subclass of the target device, use kUSBAnySubClass for any subclass
<--> usbProtocol
The protocol of the target device, use kUSBAnyProtocol for any protocol
<--> usbVendor
The vendor ID of the target device, use kUSBAnyVendor for any vendor
<--> usbProduct
The product ID of the target device, use kUSBAnyProduct for any product
<-- result
The status of the call
<-- token
The value returned to uniquely identify this particular device notification. You pass this value to the USBRemoveDeviceNotification function.
--> callback
A pointer to the callback routine to be called when the notification criteria is satisfied

© 1999 Apple Computer, Inc.

Previous | Back Up One Level | Next | Show Frames | Hide Frames